package com.dome.thread;

public class ThreadTest {
    public static void main(String[] args) {
        Medium medium=new Medium();
        Consumer consumer=new Consumer(medium);
        Producer producer=new Producer(medium);
        Thread c=new Thread(consumer);
        c.setName("吃货");
        Thread p=new Thread(producer);
        p.setName("厨子");

        c.start();
        p.start();

    }
}
